<?php
class TransactionUpperColumnAction extends SzAbstractAction
{
    protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT
    );

    /**
     * 商铺栏位上架
     *
     * @param int $userId
     * @param int $reqTime
     * @param int $columnNumber
     * @param int $itemDefId
     * @param int $count
     * @param int $price
     * @return SzResponse
     */
    public function execute($userId, $reqTime, $columnNumber, $itemDefId, $count, $price)
    {
        if (!GameService::get()->verifySysUnlock($userId, GameConst::FUNC_TRANSACTION_FUNC)) {
            return $this->buildResponse(false);
        }

        GameService::get()->validateMultiRequestTimeDelta($userId, $reqTime);

        return $this->buildResponse(
            TransactionService::get()->onShelf($userId, $columnNumber, $itemDefId, $count, $price)
        );
    }

}